package com.sqfw.project.wp.service.impl;

import java.util.List;
import com.sqfw.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sqfw.project.wp.mapper.WpUpdateLogMapper;
import com.sqfw.project.wp.domain.WpUpdateLog;
import com.sqfw.project.wp.service.IWpUpdateLogService;

/**
 * 工单修改日志Service业务层处理
 * 
 * @author lx
 * @date 2023-06-28
 */
@Service
public class WpUpdateLogServiceImpl implements IWpUpdateLogService 
{
    @Autowired
    private WpUpdateLogMapper wpUpdateLogMapper;

    /**
     * 查询工单修改日志
     * 
     * @param autoId 工单修改日志主键
     * @return 工单修改日志
     */
    @Override
    public WpUpdateLog selectWpUpdateLogByAutoId(String autoId)
    {
        return wpUpdateLogMapper.selectWpUpdateLogByAutoId(autoId);
    }

    /**
     * 查询工单修改日志列表
     * 
     * @param wpUpdateLog 工单修改日志
     * @return 工单修改日志
     */
    @Override
    public List<WpUpdateLog> selectWpUpdateLogList(WpUpdateLog wpUpdateLog)
    {
        return wpUpdateLogMapper.selectWpUpdateLogList(wpUpdateLog);
    }

    /**
     * 新增工单修改日志
     * 
     * @param wpUpdateLog 工单修改日志
     * @return 结果
     */
    @Override
    public int insertWpUpdateLog(WpUpdateLog wpUpdateLog)
    {
        wpUpdateLog.setCreateTime(DateUtils.getNowDate());
        return wpUpdateLogMapper.insertWpUpdateLog(wpUpdateLog);
    }

    /**
     * 修改工单修改日志
     * 
     * @param wpUpdateLog 工单修改日志
     * @return 结果
     */
    @Override
    public int updateWpUpdateLog(WpUpdateLog wpUpdateLog)
    {
        wpUpdateLog.setUpdateTime(DateUtils.getNowDate());
        return wpUpdateLogMapper.updateWpUpdateLog(wpUpdateLog);
    }

    /**
     * 批量删除工单修改日志
     * 
     * @param autoIds 需要删除的工单修改日志主键
     * @return 结果
     */
    @Override
    public int deleteWpUpdateLogByAutoIds(String[] autoIds)
    {
        return wpUpdateLogMapper.deleteWpUpdateLogByAutoIds(autoIds);
    }

    /**
     * 删除工单修改日志信息
     * 
     * @param autoId 工单修改日志主键
     * @return 结果
     */
    @Override
    public int deleteWpUpdateLogByAutoId(String autoId)
    {
        return wpUpdateLogMapper.deleteWpUpdateLogByAutoId(autoId);
    }
}
